]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Show session menu button when in IN_PROGRESS status
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Feb 2025 13:11:04 +0000 (14:11 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 12 Apr 2025 18:16:29 +0000 (18:16 +0000)
Commit c8bb45b added a new IN_PROGRESS status that replaces FAILED
while the user is still allowed to retry authentication.

We need to account for it when updating the visibility of the
session menu button, otherwise the button disappears after
entering a wrong password.

Fixes: c8bb45b41c ("gdm: Limit verification cancellations to be conform to allowed-failures")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5784
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3638>

js/gdm/loginDialog.js

index fa916150260e9db3b3fc3987bfb1d25b6c6ac903..6ead9ab0fb56066e70f58109dc2292950cdb8643 100644 (file)
@@ -1035,8 +1035,12 @@ export const LoginDialog = GObject.registerClass({
     }
 
     _shouldShowSessionMenuButton() {
-        if (this._authPrompt.verificationStatus !== AuthPrompt.AuthPromptStatus.VERIFYING &&
-            this._authPrompt.verificationStatus !== AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED)
+        const visibleStatuses = [
+            AuthPrompt.AuthPromptStatus.VERIFYING,
+            AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED,
+            AuthPrompt.AuthPromptStatus.VERIFICATION_IN_PROGRESS,
+        ];
+        if (!visibleStatuses.includes(this._authPrompt.verificationStatus))
             return false;
 
         if (this._user && this._user.is_loaded && this._user.is_logged_in())